<?php
class model_newagk_sections extends gdl_components_basemodel
{

    public function primarykey() {
        return 'id';
    }

    public function tableName() {
        return 'agk_sections';
    } 
	
	public function getInfoArgOne($arrg=[],$field)
    {
		if(empty($arrg)) return false;
		return $this->selectOne($arrg, $field);
    }
	
	public function getInfoArg($arrg=[],$field)
    {
		if(empty($arrg)) return false;
		return $this->select($arrg, $field)->items;
    }
	
	public function sectionArr($qbankid=0)
    {
		if(!$qbankid) return [];
		$seName = $this->getInfoArg(['qbankId'=>$qbankid],'id,seName');
		$section = [];
		foreach($seName as $v){
			$section[$v['id']] = $v['seName'];
		}
		return $section;
    }
}
